package com.free.others;


import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;


/**
 * <p>Title: Eclipse Plugin Development</p>
 * <p>Description: Free download</p>
 * <p>mail: ganshm@gmail.com</p>
 */

public class ColorListTest {
	  public ColorListTest() {
	    Display display = new Display();
	    Shell shell = new Shell(display);
	    
	    ColorList customlist = new ColorList( shell, SWT.V_SCROLL | SWT.H_SCROLL );
		customlist.add(SWT.COLOR_BLACK,"BLACK");
		customlist.add(SWT.COLOR_BLUE,"BLUE");
		customlist.setSelection(1);
		customlist.setSize(400,400);
	    customlist.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));

	    
	    shell.setSize(200, 200);
	    shell.open();
	    
	    // Set up the event loop.
	    while (!shell.isDisposed()) {
	      if (!display.readAndDispatch()) {
	        // If no more entries in event queue
	        display.sleep();
	      }
	    }

	    display.dispose();
	  }

	  public static void main(String[] args) {
	    new ColorListTest();
	  }
	} 


